package net.yiny.scrummer.ui.storyboard

import groovy.swing.SwingBuilder

public class PhaseStripBuilder extends ContainerBuilder {

    static void main(args) {
        def children = (1..2).collect {new CardBuilder()}
        def builder = new PhaseStripBuilder(children: children)
        builder.addListener([mouseClicked: {println 'Yahoo!'}])
        def swing = new SwingBuilder()
        def frame = swing.frame(title: 'Test') {
            panel(builder.initialise())
        }
        frame.with {
            children.size.times {
                children[it].id = "#${(100 + it)}"
                children[it].name = "Name$it"
                children[it].description = 'description' * 6
            }
            pack()
            visible = true
        }
    }
}